ARINC653: fix NULL pointer dereference in free_vdata
authorNathan Studer <nate.studer@dornerworks.com>
Mon, 4 Nov 2013 15:21:11 +0000 (16:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 Nov 2013 15:21:11 +0000 (16:21 +0100)
commit77b590e41517c7409ab841238683e861acc528dd
tree296719322691dbb3c76415c58267c9bde04510a5
parentd8b037eaf34233791124bf4da1f7a22c98e42523
ARINC653: fix NULL pointer dereference in free_vdata

The ARINC653 scheduler alloc_vdata function does not add the
idle cpu to its internal vcpu_list, but when the free_vdata
function is called, the scheduler attempted to remove the vcpu
from its internal vcpu_list, regardless of whether or not
the vcpu was the idle vcpu.  Since the idle vcpu's list field
was never initialized, a NULL pointer was passed to list_del.

When using cpupools, this resulted in a crash when moving a cpu
from an arinc653 scheduler pool.

Signed-off-by: Nathan Studer <nate.studer@dornerworks.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/sched_arinc653.c